#include<bits/stdc++.h>
using namespace std;
int main()
{
	string s;
	cin >> s;
	for (int i = 0; i < (int)s.length(); i++) {

		if (s[i] >= '1' && s[i] <= '9') {
			for (int j = 1; j <= (int ) s[i] - '1' ; j++) {
				cout << s[i - 1];
			}
		} else {
			cout << s[i];
		}
	}

	return 0;
}

//Easonwillbebest
//07-14 01:06:47
